import axios from 'axios'

export function handleGetGoogleToken(code) {
    return axios.post('https://oauth2.googleapis.com/token', {
        code: code,
        client_id: '1009363928622-cm718vthk2qgea3vkuif8lcjcss4sug2.apps.googleusercontent.com',
        client_secret: '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',
        redirect_uri: window.location.origin,
        grant_type: 'authorization_code'
    })
}

export async function handleGetGoogleUserInfo(token) {
    return axios.get('https://www.googleapis.com/oauth2/v2/userinfo', {
        headers: {
            Authorization: `Bearer ${token}`
        }
    })
}